local thbattle__xiaoye_feidao = fk.CreateSkill {

  name = "thbattle__xiaoye_feidao",

  tags = {},

}



thbattle__xiaoye_feidao:addEffect("viewas", {
  anim_type = "offensive",
  pattern = "slash",
  prompt = "#thbattle__xiaoye_feidao",
  card_filter =function (self, player, to_select, selected)
      if #selected == 1 then return false end
    return Fk:getCardById(to_select).type == Card.TypeEquip
  end,
  view_as = function(self, player, cards)
    if #cards ~= 1 then return nil end
    local c = Fk:cloneCard("danmu__slash")
    c.skillName = thbattle__xiaoye_feidao.name
    c:addSubcard(cards[1])
    return c
  end,
})

thbattle__xiaoye_feidao:addEffect("targetmod", {
  bypass_distances = function(self, player, skill, card, to)
    return player:hasSkill(thbattle__xiaoye_feidao.name) and card.skillName == "thbattle__xiaoye_feidao"
  end
})

return thbattle__xiaoye_feidao
